﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Browser;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using jLight;
using jLight.Extensions;

namespace jLightTest
{
    public partial class DemoPage1 : UserControl
    {
        public DemoPage1()
        {
            InitializeComponent();
            
            jQuery.Load();

            jQuery.Select("input").Submit(HandleSubmit);
        }


        private object HandleSubmit(object args)
        {
            jQuery.Select("input:text").Each((a, b) =>
                                                 {
                                                     textBox1.Text += jQueryObject.FromObject(a).Val();
                                                     return null;
                                                 });
            return false;
        }

        private void ButtonClick(object sender, RoutedEventArgs e)
        {
            jQuery.Select("input").RemoveAttr("disabled");
        }
    }
}
